package com.woniu.liuzhougov.WorkPlan.controller;

import com.woniu.liuzhougov.WorkPlan.pojo.PlanType;
import com.woniu.liuzhougov.WorkPlan.service.PlanTypeService;
import com.woniu.liuzhougov.WorkPlan.util.IJSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Description:
 * @Author: junzhao
 * @Date: 2019-04-19 16:08
 */
@Controller
public class PlanTypeController {

    @Autowired
    private PlanTypeService planTypeService;

    /**
     * @Description: 查询所有工作计划类型
     * @Author: JunZhao
     * @Date: 2019-04-22 11:36
     * @Param: []
     * @Return: com.woniu.liuzhougov.WorkPlan.util.IJSONResult
     */
    @RequestMapping(value = "plan/type/list")
    @ResponseBody
    public IJSONResult list(){
        List<PlanType> PlanTypeList = planTypeService.queryAllPlanType();
        return IJSONResult.ok(PlanTypeList);
    }
}
